import { COLL_JIA, COLL_JIAN } from "../constants";
import store from "../store";

//声明 reducer 函数
const CollReducer = (state=99, action) => {
    switch(action.type){
        case COLL_JIA:
            return state + action.data;
        case COLL_JIAN:
            return state - action.data;
        default: 
            return state;
    }
}

export default CollReducer;